﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Medical.DataInterface;
using Medical.Data;
using Medical.Entity;

namespace Medical.Business
{
    /// <summary>
    /// 管理员类型业务操作类
    /// </summary>
    public class BisAdminType
    {
        /// <summary>
        /// 接口
        /// </summary>
        IAdminTypeAccessor accessor;

        /// <summary>
        /// 构造函数
        /// </summary>
        public BisAdminType()
        {
            //创建接口
            accessor = DataAccess.GetAdminTypeAccessor();
        }

        /// <summary>
        /// 获取管理员类型
        /// </summary>
        /// <param name="nID"></param>
        /// <returns></returns>
        public AdminType Get(int nID)
        {
            return accessor.Get(nID);
        }

        /// <summary>
        /// 获取权限值列表
        /// </summary>
        /// <returns></returns>
        public DataTable GetAdminFeatures()
        {
            return accessor.GetAdminFeatures();
        }

          /// <summary>
        /// 获取管理员权限组列表
        /// </summary>
        /// <returns></returns>
        public DataTable GetList()
        {
            return accessor.GetList();
        }

        /// <summary>
        /// 新增管理员类型
        /// </summary>
        /// <param name="Info"></param>
        /// <returns></returns>
        public bool Insert(AdminType Info)
        {
            return accessor.Insert(Info);
        }

        /// <summary>
        /// 编辑管理员类型
        /// </summary>
        /// <param name="Info"></param>
        /// <returns></returns>
        public bool Update(AdminType Info)
        {
            return accessor.Update(Info);
        }

        /// <summary>
        /// 删除管理员类型
        /// </summary>
        /// <param name="nID">ID</param>
        /// <returns></returns>
        public bool Delete(int nID)
        {
            return accessor.Delete(nID);
        }
    }
}
